<HTML>
<HEAD><TITLE>Residency Page</TITLE></HEAD>
<BODY>
<%
String street= request.getParameter("street");
session.setAttribute("street",street);
String city = request.getParameter("city");
session.setAttribute("city",city);
if(session.getAttribute("residence").equals("United States"))
{		
	String state = request.getParameter("state");
	session.setAttribute("state",state);
}
else
{
	String code = request.getParameter("code");
	session.setAttribute("code",code);
}
String zipCode = request.getParameter("zipCode");
session.setAttribute("zipCode",zipCode);
String areaCode = request.getParameter("areaCode");
session.setAttribute("areaCode",areaCode);
String number = request.getParameter("number");
session.setAttribute("number",number);
%>
User Name : <%= session.getAttribute("fullName")%> <p>
Citizenship : <%=session.getAttribute("country")%> <p>
Country of Residence : <%=session.getAttribute("residence")%> <p>
Address : <p>
Street : <%=street%><p>
City : <%=city%><p>
<% if(session.getAttribute("residence").equals("United States"))
	out.println("State : " + request.getParameter("state") + "<br>");
	else
	out.println("Telephone Code : " + request.getParameter("code") + "<br>");
%>
<p>
Zip Code : <%=zipCode%><p>
Phone Number : <%=areaCode%>-<%=number%><p>

Please choose your residency status : 
<FORM METHOD=GET ACTION="location.jsp">
<INPUT TYPE="RADIO" NAME="residency" value="US Permanent Resident" checked>
US Permanent Resident<br>
<INPUT TYPE="RADIO" NAME="residency" value="Non-Resident">
Non-Resident<br>
<INPUT TYPE="SUBMIT" VALUE="Submit"/>
</FORM>
</BODY>
</HTML>
